<!doctype html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"/>
    <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
    <title>Heron</title>
    <link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin>
    <meta name="msapplication-TileColor" content="#206bc4"/>
    <meta name="theme-color" content="#206bc4"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="mobile-web-app-capable" content="yes"/>
    <meta name="HandheldFriendly" content="True"/>
    <meta name="MobileOptimized" content="320"/>
    <meta name="robots" content="noindex,nofollow,noarchive"/>
    <!--    <link rel="icon" href="./favicon.ico" type="image/x-icon"/>-->
    <!--    <link rel="shortcut icon" href="./favicon.ico" type="image/x-icon"/>-->
    <!-- CSS files -->
    <link href="/dist/css/tabler.min.css" rel="stylesheet"/>
    <link href="/dist/css/demo.min.css" rel="stylesheet"/>
    <style>
        body {
            display: none;
        }
    </style>
</head>
<body class="antialiased">
<div class="page">
    <header class="navbar navbar-expand-md navbar-light">
        <div class="container-fluid">
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-menu">
                <span class="navbar-toggler-icon"></span>
            </button>
            <a href="/" class="navbar-brand navbar-brand-autodark d-none-navbar-horizontal pr-0 pr-md-3">
                <img src="./static/logo.svg" th:src="@{/static/logo.svg}" alt="Tabler" class="navbar-brand-image">
            </a>
            <div class="navbar-nav flex-row order-md-last">
                <div class="nav-item dropdown">
                    <a href="#" class="nav-link d-flex lh-1 text-reset p-0" data-toggle="dropdown">
                        <div th:switch="${session.currentUser.avatar == '' or session.currentUser.avatar == null}">
                                                                    <span class="avatar avatar-md" th:case="true"><svg
                                                                            xmlns="http://www.w3.org/2000/svg"
                                                                            class="icon icon-md" width="24"
                                                                            height="24" viewBox="0 0 24 24"
                                                                            stroke-width="2" stroke="currentColor"
                                                                            fill="none" stroke-linecap="round"
                                                                            stroke-linejoin="round"><path
                                                                            stroke="none" d="M0 0h24v24H0z"></path><circle
                                                                            cx="12" cy="7"
                                                                            r="4"></circle><path
                                                                            d="M5.5 21v-2a4 4 0 0 1 4 -4h5a4 4 0 0 1 4 4v2"></path></svg></span>
                            <span class="avatar avatar-md" th:case="false"
                                  th:style="'background-image:url('+${session.currentUser.avatar}+')'"></span>
                        </div>
                        <div class="d-none d-xl-block pl-2">
                            <div th:text="${session.currentUser.account}">Paweł Kuna</div>
                            <div class="mt-1 small text-muted" th:text="${session.currentUser.eMail}">UI Designer</div>
                        </div>
                    </a>
                </div>
                <div class="nav-item" style="margin-left: 20px;margin-right: 20px">
                    <a href="/logout">
                        <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-md" width="24" height="24"
                             viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none"
                             stroke-linecap="round" stroke-linejoin="round">
                            <path stroke="none" d="M0 0h24v24H0z"></path>
                            <path d="M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2"></path>
                            <path d="M7 12h14l-3 -3m0 6l3 -3"></path>
                        </svg>
                        退出
                    </a>
                </div>
            </div>
        </div>
    </header>
    <div class="navbar-expand-md">
        <div class="collapse navbar-collapse" id="navbar-menu">
            <div class="navbar navbar-light">
                <div class="container-fluid">
                    <ul class="navbar-nav">
                        <li class="nav-item">
                            <a class="nav-link" href="/index">
                    <span class="nav-link-icon d-md-none d-lg-inline-block"><svg xmlns="http://www.w3.org/2000/svg"
                                                                                 class="icon" width="24" height="24"
                                                                                 viewBox="0 0 24 24" stroke-width="2"
                                                                                 stroke="currentColor" fill="none"
                                                                                 stroke-linecap="round"
                                                                                 stroke-linejoin="round"><path
                            stroke="none" d="M0 0h24v24H0z"/><polyline points="5 12 3 12 12 3 21 12 19 12"/><path
                            d="M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-7"/><path
                            d="M9 21v-6a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v6"/></svg>
                    </span>
                                <span class="nav-link-title">
                      首页
                    </span>
                            </a>
                        </li>
                        <li class="nav-item" th:each="menu:${menus}"
                            th:classappend="${menu.child.size() == 0} ? '' : dropdown"
                            th:switch="${menu.child.size() > 0}">
                            <a th:case="true" class="nav-link dropdown-toggle" data-toggle="dropdown"
                               role="button"
                               aria-expanded="false">
                                <span class="nav-link-icon d-md-none d-lg-inline-block"></span>
                                <span class="nav-link-title" th:text="${menu.menuName}"></span>
                            </a>
                            <a th:case="false" class="nav-link"
                               th:href="@{{url}(url=${menu.url}, menuName=${menu.menuName})}">
                                <span class="nav-link-icon d-md-none d-lg-inline-block"></span>
                                <span class="nav-link-title" th:text="${menu.menuName}"></span>
                            </a>
                            <ul class="dropdown-menu dropdown-menu-columns dropdown-menu-columns-2"
                                th:if="${menu.child.size() > 0}">
                                <li th:each="item:${menu.child}">
                                    <a class="dropdown-item"
                                       th:href="@{{url}(url=${item.url}, menuName=${item.menuName})}"
                                       th:text="${item.menuName}"></a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div class="content">
        <div class="container-fluid">
            <!-- Page title -->
            <div class="page-header">
                <div class="row align-items-center">
                    <div class="col-auto">
                        <h2 class="page-title" th:text="${text}"></h2>
                    </div>
                </div>
            </div>
            <div class="row row-deck row-cards">
                <!--cpu-->
                <div class="col-md-6 col-lg-4">
                    <div class="card">
                        <div class="card-header">
                            <h4 class="card-title">CPU</h4>
                        </div>
                        <table class="table card-table table-vcenter">
                            <thead>
                            <tr>
                                <th>属性</th>
                                <th colspan="2">值</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td>cpu核数</td>
                                <td th:text="${systemMonitor.cpuCoreCount}"></td>
                            </tr>
                            <tr>
                                <td>cpu系统使用率</td>
                                <td th:text="${systemMonitor.cpuSysUsage}"></td>
                            </tr>
                            <tr>
                                <td>cpu用户使用率</td>
                                <td th:text="${systemMonitor.cpuUserUsage}"></td>
                            </tr>
                            <tr>
                                <td>cpu当前使用率</td>
                                <td th:text="${systemMonitor.cpuUsage}"></td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                <!--memory-->
                <div class="col-md-6 col-lg-4">
                    <div class="card">
                        <div class="card-header">
                            <h4 class="card-title">内存</h4>
                        </div>
                        <table class="table card-table table-vcenter">
                            <thead>
                            <tr>
                                <th>属性</th>
                                <th colspan="2">内存</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td>总内存</td>
                                <td th:text="${systemMonitor.memoryTotalStr}"></td>
                            </tr>
                            <tr>
                                <td>已用内存</td>
                                <td th:text="${systemMonitor.memoryUsedStr}"></td>
                            </tr>
                            <tr>
                                <td>剩余内存</td>
                                <td th:text="${systemMonitor.memoryAvailableStr}"></td>
                            </tr>
                            <tr>
                                <td>内存使用率</td>
                                <td th:text="${systemMonitor.memoryUsage}"></td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                <!--jvm-->
                <div class="col-md-6 col-lg-4">
                    <div class="card">
                        <div class="card-header">
                            <h4 class="card-title">Java虚拟机信息</h4>
                        </div>
                        <table class="table card-table table-vcenter">
                            <thead>
                            <tr>
                                <th>属性</th>
                                <th colspan="2">值</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td>java版本</td>
                                <td th:text="${systemMonitor.javaVersion}"></td>
                            </tr>
                            <tr>
                                <td>jvm内存总量</td>
                                <td th:text="${systemMonitor.jvmMemoryTotalStr}"></td>
                            </tr>
                            <tr>
                                <td>jvm已使用内存</td>
                                <td th:text="${systemMonitor.jvmMemoryUsedStr}"></td>
                            </tr>
                            <tr>
                                <td>jvm剩余内存</td>
                                <td th:text="${systemMonitor.jvmMemoryAvaliableStr}"></td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                <div class="col-md-12 col-lg-12">
                    <div class="card">
                        <div class="card-header">
                            <h4 class="card-title">服务器信息</h4>
                        </div>
                        <table class="table card-table table-vcenter">
                            <thead>
                            <tr>
                                <th>属性</th>
                                <th colspan="2">值</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td>操作系统名</td>
                                <td th:text="${systemMonitor.osName}"></td>
                            </tr>
                            <tr>
                                <td>系统架构</td>
                                <td th:text="${systemMonitor.osArch}"></td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <footer class="footer footer-transparent">
            <div class="container">
                <div class="row text-center align-items-center flex-row-reverse">
                    <div class="col-lg-auto ml-lg-auto">
                        <ul class="list-inline list-inline-dots mb-0">
                            <li class="list-inline-item"><a href="./docs/index.html" class="link-secondary">文旦</a>
                            </li>
                            <li class="list-inline-item"><a href="./faq.html" class="link-secondary">FAQ</a></li>
                            <li class="list-inline-item"><a href="https://github.com/tabler/tabler" target="_blank"
                                                            class="link-secondary">源代码</a></li>
                        </ul>
                    </div>
                    <div class="col-12 col-lg-auto mt-3 mt-lg-0">
                        Copyright © 2020
                        <a href="." class="link-secondary">Tabler</a>.
                        All rights reserved.
                    </div>
                </div>
            </div>
        </footer>
    </div>
</div>
<!-- Libs JS -->
<script src="/dist/libs/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<!-- Tabler Core -->
<script src="/dist/js/tabler.min.js"></script>
<script>
    document.body.style.display = "block"
</script>
</body>
</html>
